import request from '@/utils/request'
import { commonList, commonAdd, commonEdit, commonBatchDelete, commonDetail } from '../_common'

//api controller根路径，前后不带 /
const controller = 'media-search';

/**
 * 获取记录列表
 * @param data
 */
export function list(data) {
  return commonList(controller)(data);
}

/**
 * 获取记录详情
 * @param id 记录id
 */
export function detail(id) {
  return commonDetail(controller)(id);
}


export function getLabel(mediaId) {
  return request({
    url: `/media-search/${mediaId}/tag`,
    method: 'get',
  })
}

export function download(mediaId) {
  return request({
    url: `/media-search/${mediaId}/download-url`,
    method: 'get',
  })
}
